import request from '../utils/request'

// 获取客服列表
export function getServiceList(params) {
    return request({
        url: '/v1/user/serviceList',
        method: 'get',
        params
    })
}

// 获取客服详情
export function getServiceDetail(id) {
    return request({
        url: `/service/${id}`,
        method: 'get'
    })
}

// 添加客服
export function addService(data) {
    return request({
        url: '/v1/user/createService',
        method: 'post',
        data
    })
}

// 更新客服信息
export function updateService(data) {
    return request({
        url: '/v1/user/updateService',
        method: 'post',
        data
    })
}

// 删除客服
export function deleteService(id) {
    return request({
        url: `/v1/user/deleteService`,
        method: 'delete',
        data: {
            id
        }
    })
}

// 获取客服状态
export function getServiceStatus() {
    return request({
        url: '/v1/user/serviceStatus',
        method: 'get'
    })
} 